package cn.qingyun.gis.modules.scenes.controller;

import cn.qingyun.gis.common.Result;
import cn.qingyun.gis.modules.scenes.request.BindChannelRequest;
import cn.qingyun.gis.modules.scenes.service.PoiWgtInvokeService;
import io.swagger.annotations.Api;
import io.swagger.annotations.ApiOperation;
import lombok.extern.slf4j.Slf4j;
import org.springframework.validation.annotation.Validated;
import org.springframework.web.bind.annotation.PostMapping;
import org.springframework.web.bind.annotation.RequestBody;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;

import javax.annotation.Resource;

/**
 * @author LHJ
 * @description
 * @date 2024/10/25 15:21
 */
@Api(tags = "调用网格通应用层")
@RequestMapping("/app/scenes/wgt/")
@RestController
@Slf4j
@Validated
public class PoiWgtInvokeController {

    @Resource
    private PoiWgtInvokeService poiWgtInvokeService;

    @ApiOperation("查询用户是否关联泛渠道")
    @PostMapping("/select/bind/channel")
    public Result<?> selectBindChannel(@Validated @RequestBody BindChannelRequest request) {
        return Result.okData(poiWgtInvokeService.isBindChannel(request));
    }
}
